package com.shensi.appCollect.utils.tonglianpay.tlfusclasspay;//package com.shensi.appCollect.utils.tonglianpay.tlfusclasspay;
//
//import com.ursa.oil.demo.constant.CommonConstants;
//import com.ursa.oil.demo.struct.body.ConsumeTypeListQuery;
//import com.ursa.oil.demo.struct.body.EmployeeListQuery;
//import com.ursa.oil.demo.struct.body.GunListQuery;
//import com.ursa.oil.demo.struct.body.PayApply;
//import com.ursa.oil.demo.struct.body.PayListQuery;
//import com.ursa.oil.demo.struct.body.PayQuery;
//import com.ursa.oil.demo.struct.body.PayRefund;
//import com.ursa.oil.demo.struct.body.ShiftsListQuery;
//import com.ursa.oil.demo.struct.body.StationListQuery;
//import com.ursa.oil.demo.struct.support.ConsumeType;
//import com.ursa.oil.demo.struct.support.OilStation;
//import com.ursa.oil.demo.support.HttpClient;
//import java.io.IOException;
//import java.util.ArrayList;
//import java.util.Date;
//import java.util.List;
//import org.apache.commons.lang3.time.DateFormatUtils;
//import org.junit.Test;
//
///**
// * @author zzq
// * @version 1.0.0
// * @Title {@link}
// * @Description
// * @date 2020/5/27
// */
//public class RequestTest {
//
//    public void payApply() throws IOException {
//        PayApply payApply = new PayApply();
//        payApply.setSysId(CommonConstants.SYS_ID);
//        payApply.setBizOrderNo(String.valueOf(System.currentTimeMillis()));
//        payApply.setAmount(1L);
//        payApply.setBackUrl("http://www.baidu.com");
//        payApply.setPayType("SCAN_WEIXIN");
//        payApply.setLimitPay("no_credit");
//        List<ConsumeType> consumeTypes = new ArrayList<>();
//        ConsumeType consumeType = new ConsumeType();
//        consumeType.setType("C0001");
//        consumeType.setAmount(1L);
//        consumeTypes.add(consumeType);
//        payApply.setConsumeTypes(consumeTypes);
//        OilStation oilStation = new OilStation();
//        oilStation.setOilStationNo(CommonConstants.OIL_STATION_NO);
//        payApply.setOilStation(oilStation);
//        payApply.setShiftsTime(DateFormatUtils.format(new Date(), "yyyyMMdd"));
//        payApply.setShiftsMask(CommonConstants.SHIFTS_MASK_1);
//        payApply.setRemark("这是备注");
//
//        HttpClient.post("oil.pay.apply", payApply);
//    }
//
//    public void payRefund() throws IOException {
//        PayRefund payRefund = new PayRefund();
//        payRefund.setSysId(CommonConstants.SYS_ID);
//        payRefund.setBizOrderNo(String.valueOf(System.currentTimeMillis()));
//        payRefund.setOldBizOrderNo("1590559936873");
//        payRefund.setAmount(1L);
//        List<ConsumeType> consumeTypes = new ArrayList<>();
//        ConsumeType consumeType = new ConsumeType();
//        consumeType.setType("C0001");
//        consumeType.setAmount(1L);
//        consumeTypes.add(consumeType);
//        payRefund.setConsumeTypes(consumeTypes);
//        payRefund.setShiftsTime(DateFormatUtils.format(new Date(), "yyyyMMdd"));
//        payRefund.setShiftsMask(CommonConstants.SHIFTS_MASK_1);
//        payRefund.setRemark("这是退款备注");
//        HttpClient.post("oil.pay.refund", payRefund);
//    }
//
//    public void payQuery() throws IOException {
//        PayQuery payQuery = new PayQuery();
//        payQuery.setSysId(CommonConstants.SYS_ID);
//        payQuery.setBizOrderNo("1590559936873");
//        HttpClient.post("oil.pay.query", payQuery);
//    }
//
//    public void payListQuery() throws IOException {
//        PayListQuery query = new PayListQuery();
//        query.setSysId(CommonConstants.SYS_ID);
//        query.setStartTime("20200527000000");
//        query.setEndTime("20200527235959");
//        query.setOilStationNo(CommonConstants.OIL_STATION_NO);
//        query.setPayStatus("0000");
//        query.setPage(1);
//        query.setPageSize(10);
//
//        HttpClient.post("oil.pay.list", query);
//    }
//
//    public void stationListQuery() throws IOException {
//        StationListQuery query = new StationListQuery();
//        query.setSysId(CommonConstants.SYS_ID);
//
//        HttpClient.post("oil.station.list", query);
//    }
//
//    public void consumeTypeList() throws IOException {
//        ConsumeTypeListQuery query = new ConsumeTypeListQuery();
//        query.setSysId(CommonConstants.SYS_ID);
//        query.setOilStationNo(CommonConstants.OIL_STATION_NO);
//
//        HttpClient.post("oil.consume.type.list", query);
//    }
//
//    public void shiftsListQuery() throws IOException {
//        ShiftsListQuery query = new ShiftsListQuery();
//        query.setSysId(CommonConstants.SYS_ID);
//        query.setOilStationNo(CommonConstants.OIL_STATION_NO);
//
//        HttpClient.post("oil.station.shifts.list", query);
//    }
//
//    public void employeeListQuery() throws IOException {
//        EmployeeListQuery query = new EmployeeListQuery();
//        query.setSysId(CommonConstants.SYS_ID);
//        query.setOilStationNo(CommonConstants.OIL_STATION_NO);
//
//        HttpClient.post("oil.employee.list", query);
//    }
//
//    public void gunListQuery() throws IOException {
//        GunListQuery query = new GunListQuery();
//        query.setSysId(CommonConstants.SYS_ID);
//        query.setOilStationNo(CommonConstants.OIL_STATION_NO);
//
//        HttpClient.post("oil.gun.list", query);
//    }
//}
